package TFIDF;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class MyGroup extends WritableComparator {
    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        Text t1 = (Text) a;
        Text t2 = (Text) b;
        return t1.toString().split("_")[1].compareTo(t2.toString().split("_")[1]);
    }
    public MyGroup(){
        super(Text.class,true);
    }
}
